From e4f42ed7eceb304224556a245b379509dd272db1 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 13 Jul 2010 19:27:33 +0100 Subject: [PATCH] tools/ocaml: register the ocaml exception so it can be used at the C level. Signed-off-by: Vincent Hanquez --- tools/ocaml/libs/xl/xl.ml | 4 ++++ tools/ocaml/libs/xl/xl.mli | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tools/ocaml/libs/xl/xl.ml b/tools/ocaml/libs/xl/xl.ml index 0f665aebfe..1e3642fe48 100644 --- a/tools/ocaml/libs/xl/xl.ml +++ b/tools/ocaml/libs/xl/xl.ml @@ -13,6 +13,8 @@ * GNU Lesser General Public License for more details. *) +exception Error of string + type create_info = { hvm : bool; @@ -207,3 +209,5 @@ external domain_sched_credit_set : domid -> sched_credit -> unit = "stub_xl_sche external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys" + +let _ = Callback.register_exception "xl.error" (Error "register_callback") diff --git a/tools/ocaml/libs/xl/xl.mli b/tools/ocaml/libs/xl/xl.mli index 0f665aebfe..4193e59a6d 100644 --- a/tools/ocaml/libs/xl/xl.mli +++ b/tools/ocaml/libs/xl/xl.mli @@ -13,6 +13,8 @@ * GNU Lesser General Public License for more details. *) +exception Error of string + type create_info = { hvm : bool; -- 2.30.2